package com.huarui.partner.dao;

import java.util.List;
import java.util.Map;

import org.ewaf.framework.dao.IBaseDao;
import org.ewaf.framework.model.IDataObject;

import com.huarui.partner.model.Partner;

/**
 * 客户IDAO
 * 
 * @author ycf
 * 
 */
public interface IPartnerDao extends IBaseDao {

	/**
	 * 删除用户（就是将delete属性设为false）
	 * 
	 * @param c
	 */
	public void deletePartner(Partner ptr);

	/**
	 * 根据名称模糊查询业务伙伴
	 * 
	 * @param name
	 * @return
	 */
	public List<Partner> getPartnersByLikeName(String name);

	public List<Partner> getPartnerByOwnerId(Integer ownerId);

	/**
	 * 检查业务伙伴名称吃否存在
	 * 
	 * @param name
	 * @return
	 */
	public boolean validatePartnerName(String name);

	@SuppressWarnings("unchecked")
	public List<Partner> getAllPartnerByOwnerId(Map map);

	public int countByConditions(Map map);

	public Partner getPartnerByCode(String code);

	@SuppressWarnings("unchecked")
	public List<Partner> getPartnerByOwnerIdaAndLikeName(Map map);

	@SuppressWarnings("unchecked")
	public int getCountByConditions(Map map);

	@SuppressWarnings("unchecked")
	public List<Partner> getPartnersByConditions(Map map);

	public void updatePartnerAmountById(Partner partner);

	public void batchUpdatePartner(List<Partner> partners);
	
	@SuppressWarnings("unchecked")
	public List<Partner> getPartnerByIdent(Map map);
	
	@SuppressWarnings("unchecked")
	public Partner getPartnerByTaxCode(Map map);
	
	public Partner findPartnerByOwnerId(Map map);

	public Map<String, Object> getByIdAndOwnerId(Map<String, Object> paramsMap);

	public Partner getByIdForUpdate(Integer id);
	
	public List<Partner> findPartnerByCondition(Map map);
	
	public boolean updatePartner(Partner partner);

}
